Documentation for Users  1.0.2
Perception Toolbox for Virtual Reality (PTVR) Manual
Textbox

A Textbox is the bounding box for the text you want to display. It is the container in which the text is written. A defined by:

  • its geometry (width in meters textboxWidth_m, and height in meters textboxHeight_m)
  • the line break permission isWrapping

You can set these parameters with the SetTextBoxParameters() method like this:

text = PTVR.Stimuli.Objects.Text(text="Hello", position=np.array([0.0,0.0,3.0]))
text.SetTextBoxParameters(textboxWidth_m=1, textboxHeight_m=1, isWrapping=True)
😉 Remark: When isWrapping=True the text lines are cut off to prevent them from exceeding the Textbox boundaries widthwise. When isWrapping=False, the limits of the Textbox can be exceeded, and the text will overflow from the Textbox. See the page About isWrapping parameter for a more detailed explanation.

Then, to position your Textbox in your 3D environment, you have to define the position of its center and its orientation. PTVR offers two possibilities to position your Textbox:

Pointers

Demos

Python file

Description

textbox_properties.py

Show the effect of the text box on the text.